package com.yzf.demo.demo.Redis;

/**
 * Created by 于占峰 on 2020/4/1/001.
 */
public class StringDemo {
    /**
     * redis String操作命令
     *  127.0.0.1:6379> set name "gebilaoyu"
     *   OK
     *  127.0.0.1:6379> set name "gebilaoyu" NX 表示key不存在才能成功
     *  (nil)
     *  127.0.0.1:6379> set name "gebilaoyu1" XX 表示key是否存在都成功
     *  OK
     *
     *  get key 获得指定key的value值
     *  127.0.0.1:6379> get name
     *  "gebilaoyu1"
     *
     *  mset kye value key value 批量赋值
     *  127.0.0.1:6379> mset name1 gebilaoyu1 name2 gebilaoyu2
     *  OK
     *
     *  mget key1 key2 key3 批量获取key返回集合
     *  127.0.0.1:6379> mget name name1 name2
     *  1) "gebilaoyu1"
     *  2) "gebilaoyu1"
     *  3) "gebilaoyu2"
     *
     *  strlen key 获得value的长度
     *  127.0.0.1:6379> strlen name
     * (integer) 10
     *
     *
     */
}
